﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/Layouts/Admin.Master" AutoEventWireup="true"
    CodeBehind="UserRank.aspx.cs" Inherits="MLM.AdminCP.Pages.UserRank" meta:resourcekey="PageResource1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Label runat="server" ID="lbrankManagement" Text="Rank Management" 
        meta:resourcekey="lbrankManagementResource1"></asp:Label>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <telerik:RadGrid ID="radRankGrid" runat="server" AllowFilteringByColumn="True" DataSourceID="GroupRankEds"
        AllowPaging="True" AllowSorting="True" GridLines="None" ShowGroupPanel="True"
         AllowAutomaticInserts="True" 
        AllowAutomaticUpdates="True" AllowAutomaticDeletes="True"
        ShowFooter="True" ShowStatusBar="True" 
        meta:resourcekey="radRankGridResource1">
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True">
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="RankID" DataSourceID="GroupRankEds"
            ShowHeader="true" ShowHeadersWhenNoRecords="true" AllowAutomaticInserts="true"
            CommandItemDisplay="TopAndBottom">
            <%--<MasterTableView ShowFooter="false" DataKeyNames="ProductID" EditMode="InPlace" CommandItemDisplay="TopAndBottom">--%>
            <CommandItemSettings ShowAddNewRecordButton="true" ShowRefreshButton="true">
                <%--ExportToPdfText="Export to Pdf">--%></CommandItemSettings>
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="RankID" DataType="System.Int64" HeaderText="RankID"
                    ReadOnly="True" SortExpression="RankID" UniqueName="RankID" 
                    meta:resourcekey="GridBoundColumnResource1">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name"
                    UniqueName="Name" meta:resourcekey="GridBoundColumnResource2">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MinPV" HeaderText="MinPV" SortExpression="MinPV"
                    UniqueName="MinPV" DataType="System.Int64" 
                    meta:resourcekey="GridBoundColumnResource3">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Bonus" HeaderText="Bonus (%)" SortExpression="Bonus"
                     UniqueName="Bonus" DataType="System.Int32" 
                    meta:resourcekey="GridBoundColumnResource4">
                </telerik:GridBoundColumn>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" 
                    UniqueName="EditCommandColumn" 
                    meta:resourcekey="GridEditCommandColumnResource1">
                    <ItemStyle CssClass="MyImageButton"></ItemStyle>
                </telerik:GridEditCommandColumn>
                <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                    UniqueName="DeleteColumn" meta:resourcekey="GridButtonColumnResource1">
                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
                </telerik:GridButtonColumn>
            </Columns>
            <EditFormSettings EditFormType="Template">
<EditColumn UniqueName="EditCommandColumn1"></EditColumn>
                <FormTemplate>
                    <table id="Table2" style="border-collapse: collapse; padding-left: 20">
                        <tr class="EditFormHeader" style="height: 30">
                            <td style="font-size: small" colspan="4">
                                <b>
                                    <asp:Label runat="server" ID="lbUserRank" Text="User Rank" 
                                    meta:resourcekey="lbUserRankResource1"></asp:Label></b>
                            </td>
                        </tr>
                        <tr style="height: 30px">
                            <td class="titlename">
                                <asp:Label runat="server" ID="lbname" Text="Name:" 
                                    meta:resourcekey="lbnameResource1"></asp:Label>
                            </td>
                            <td style="width: 50">
                                <telerik:RadTextBox CssClass="radtextbox" ID="RadTextBox1" runat="server" 
                                    Text='<%# Bind("Name") %>' LabelCssClass="" 
                                    meta:resourcekey="RadTextBox1Resource1">
                                </telerik:RadTextBox>
                                <asp:RequiredFieldValidator ID="TextBoxRequiredFieldValidator" runat="server" Display="Dynamic"
                                    ControlToValidate="RadTextBox1" ErrorMessage="Enter name!" 
                                    meta:resourcekey="TextBoxRequiredFieldValidatorResource1"></asp:RequiredFieldValidator>
                            </td>
                            <td>
                                <asp:Label runat="server" ID="lbminpv" Text="MinPV:" 
                                    meta:resourcekey="lbminpvResource1"></asp:Label>
                            </td>
                            <td style="width: 30">
                                <telerik:RadNumericTextBox CssClass="radtextbox" ID="RadNumericTextBox1" runat="server"
                                    Text='<%# Bind("MinPV") %>' Culture="en-US" LabelCssClass="" 
                                    meta:resourcekey="RadNumericTextBox1Resource1">
                                    <NumberFormat DecimalDigits="0" />
                                </telerik:RadNumericTextBox>
                            </td>
                        </tr>
                        <tr style="height: 30px">
                            <td class="titlename">
                                <asp:Label runat="server" ID="Label3" Text="Bonus:" 
                                    meta:resourcekey="Label3Resource1"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadNumericTextBox CssClass="radtextbox" ID="RadNumericTextBox2" runat="server"
                                    Text='<%# Bind("Bonus") %>' Culture="en-US" LabelCssClass="" 
                                    meta:resourcekey="RadNumericTextBox2Resource1">
                                    <NumberFormat DecimalDigits="0" />
                                </telerik:RadNumericTextBox>%
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic"
                                    ControlToValidate="RadNumericTextBox2" 
                                    ErrorMessage="Please, select an year number!" 
                                    meta:resourcekey="RequiredFieldValidator1Resource1"></asp:RequiredFieldValidator>
                                <asp:RangeValidator ID="NumericTextBoxRangeValidator" runat="server" ControlToValidate="RadNumericTextBox2"
                                    ErrorMessage="The bonus between 0 and 100" Display="Dynamic" MaximumValue="100"
                                    MinimumValue="0" Type="Integer" 
                                    meta:resourcekey="NumericTextBoxRangeValidatorResource1"></asp:RangeValidator>
                            </td>
                            <td>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr class="EditFormHeader" style="height: 30">
                            <td style="font-size: small" colspan="4">
                                <b>
                                    <asp:Label runat="server" ID="lbsaleheadmaneger" 
                                    Text="Sale Head Manager Config" meta:resourcekey="lbsaleheadmanegerResource1"></asp:Label></b>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label runat="server" ID="lbminnumberof" Text="Min Number Of First line" 
                                    meta:resourcekey="lbminnumberofResource1"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadNumericTextBox CssClass="radtextbox" ID="RadNumericTextBox3" runat="server"
                                    Text='<%# Bind("MinNumberOfFirstLine") %>' Culture="en-US" 
                                    LabelCssClass="" meta:resourcekey="RadNumericTextBox3Resource1">
                                    <NumberFormat DecimalDigits="0" />
                                </telerik:RadNumericTextBox>
                            </td>
                            <td>
                                <asp:Label runat="server" ID="lbMinPVPerFirstLine" Text="MinPV Per First Line" 
                                    meta:resourcekey="lbMinPVPerFirstLineResource1"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadNumericTextBox CssClass="radtextbox" ID="RadNumericTextBox4" runat="server"
                                    Text='<%# Bind("MinPVPerFirstLine") %>' Culture="en-US" LabelCssClass="" 
                                    meta:resourcekey="RadNumericTextBox4Resource1">
                                    <NumberFormat DecimalDigits="0" />
                                </telerik:RadNumericTextBox>PV
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label runat="server" ID="lbmingroupsales" Text="Min Group Sales" 
                                    meta:resourcekey="lbmingroupsalesResource1"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadNumericTextBox CssClass="radtextbox" ID="RadNumericTextBox5" runat="server"
                                    Text='<%# Bind("MinGroupSales") %>' Culture="en-US" LabelCssClass="" 
                                    meta:resourcekey="RadNumericTextBox5Resource1">
                                    <NumberFormat DecimalDigits="0" />
                                </telerik:RadNumericTextBox>PV
                            </td>
                            <td>
                                <asp:Label runat="server" ID="lbminsalehead" Text="Min Sale Head Group Sales" 
                                    meta:resourcekey="lbminsaleheadResource1"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadNumericTextBox CssClass="radtextbox" ID="RadNumericTextBox6" runat="server"
                                    Text='<%# Bind("MinRankRequiredGroupSale") %>' Culture="en-US" 
                                    LabelCssClass="" meta:resourcekey="RadNumericTextBox6Resource1">
                                    <NumberFormat DecimalDigits="0" />
                                </telerik:RadNumericTextBox>PV
                            </td>
                        </tr>
                        <tr>
                            <td style="padding-bottom: 10; padding-top: 10" colspan="2">
                                <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    runat="server" 
                                    CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' 
                                    meta:resourcekey="btnUpdateResource1">
                                </asp:Button>&nbsp;
                                <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                    CommandName="Cancel" meta:resourcekey="btnCancelResource1"></asp:Button>
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
        </MasterTableView>
        <%--<HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>--%>

<HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Office2007"></HeaderContextMenu>
    </telerik:RadGrid>
    <asp:EntityDataSource ID="GroupRankEds" runat="server" ConnectionString="name=MLMDataContext"
        DefaultContainerName="MLMDataContext" EnableDelete="True" EnableFlattening="False"
        EnableInsert="True" EnableUpdate="True" EntitySetName="Ranks" 
        EntityTypeFilter="" Select="">
    </asp:EntityDataSource>
    <h3>
        Note</h3>
    <p>
        PV = Your PV + Your Recommend Distributor PV</p>
</asp:Content>
<%--<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
</asp:Content>--%>
